<template>
  <div class="asghdh">
      <div v-for="(item,index) in list1" :key="index" 
      @click="onClickSuoyouList(item)"
      class="iyu">
          <div class="jyuers">
              <img :src="item.icon" alt="">
          </div>
          <div>
              {{item.name}}
          </div>
      </div>
  </div>
</template>

<script>
export default {
  data(){
        return{
            list1:JSON.parse(localStorage.getItem("peishi")) || [],
        }
    },
    mounted(){
        // console.log(this.$route.query.item);
        this.list1 = this.$route.query.item
        console.log(this.list1);
    },
        methods:{
        onClickSuoyouList(item){
            this.$router.push({
                path:"/searchlist",
                query:{
                    id:item.id
                }
            })
        }
    }
}
</script>

<style>

</style>